/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package FileInformation.utils;

/**
 *
 * @author Nobody
 */
public enum DataType {

    CSV, EXCEL_7, EXCEL, GDA, JTABLE;

    public static DataType convertFromExtension(String extension) {
        if (extension.equals("odt")) {
            return DataType.CSV;
        }
        if (extension.equals("gda")) {
            return DataType.GDA;
        }
        if (extension.equals("xls")) {
            return DataType.EXCEL;
        }
        if (extension.equals("xlsx")) {
            return DataType.EXCEL_7;
        }
        if (extension.equals("jtable")) {
            return JTABLE;
        }
        return DataType.CSV;

    }
}
